<# # It is recommended to test the script on a local machine for its purpose and effects. # ManageEngine Endpoint Central will not be responsible for any # damage/loss to the data/setup based on the behavior of the script. # Description: Script is designed To Append the existing regsitry value data # Configuration Type - COMPUTER / USER (Based on the regsitry Hive) # Arguments: Hardcoded inside the script (Reg Path,Value Name & Value Data) #> #Hardcode the Arguments here $path = "HKLM:\SOFTWARE\Test" $Name = "Test" $valueUpdate = "2106" # Check if the registry path exists if (-not (Test-Path -Path $path)) { Write-Host "The registry path does not exist: $path" } else { try { # Get the existing value $existing = Get-ItemProperty -Path $path -Name $Name -ErrorAction Stop $updatedValue = $existing.$Name + $valueUpdate # Update the registry value Set-ItemProperty -Path $path -Name $Name -Value $updatedValue Write-Host "Value appended successfully: $updatedValue" } catch { Write-Host "Failed to read or update the registry value. Error: $_" } }